package com.lovemanai.test;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.lovemanai.event.EmailEvent;

public class Demo1 {
	
	@Test
	public void test() {
		
		ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
		
		EmailEvent emailEvent = new EmailEvent("test","jerryjoejj@hotmail.com","这是一封测试邮件");
		//发布容器事件
		ctx.publishEvent(emailEvent);
		
	}
	
}
